package com;



import org.junit.Test;
import org.junit.Before;
import org.junit.After;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.core.IsNot.not;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.edge.EdgeDriver;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.Alert;
import org.openqa.selenium.Keys;
import java.util.*;
import java.net.MalformedURLException;
import java.net.URL;
public class Test2Test {
  private WebDriver driver;
  private Map<String, Object> vars;
  JavascriptExecutor js;
  @Before
  public void setUp() {
	  System.setProperty("webdriver.edge.driver", 
			  "src/main/java/msedgedriver.exe");
    driver = new EdgeDriver();
  }
  @After
  public void tearDown() {
    driver.quit();
  }
  @Test
  public void test2() {
    driver.get("http://localhost:8080/Ascent/product/register.jsp");
    driver.manage().window().setSize(new Dimension(1052, 1000));
    driver.findElement(By.id("username")).click();
    driver.findElement(By.id("username")).sendKeys("林林");
    driver.findElement(By.id("password")).click();
    driver.findElement(By.id("password")).sendKeys("123456");
    driver.findElement(By.id("password2")).click();
    driver.findElement(By.id("password2")).sendKeys("123456");
    driver.findElement(By.id("companyname")).click();
    driver.findElement(By.id("companyname")).sendKeys("滁州学院");
    driver.findElement(By.id("companyaddress")).sendKeys("安徽省滁州市滁州学院");
    driver.findElement(By.id("country")).sendKeys("中国");
    driver.findElement(By.id("city")).sendKeys("蚌埠市");
    driver.findElement(By.id("tel")).sendKeys("18226426365");
    driver.findElement(By.id("zip")).sendKeys("233000");
    driver.findElement(By.id("email")).sendKeys("3248933702@qq.com");
    driver.findElement(By.id("code")).click();
    driver.findElement(By.id("code")).sendKeys("24HM");
    driver.findElement(By.cssSelector("td:nth-child(1) > input:nth-child(1)")).click();

  }
}
